﻿<!doctype html>

<%@LANGUAGE="JScript" CODEPAGE="65001" %>
<!--#include file ="Includes/User.asp"-->
<!--#include file ="Includes/ASPHelpers.asp" namespace="Helpers"-->

<%/*--- BEGIN ASP ------------------------------------------------------------------------------------*/

	var h = Helpers;

	var redirect = h.Req("redirect", "search");
	var redirectURL = "";

	switch (redirect) {
		default:
		case "search":
			redirectURL = "SearchFrameSet.asp"
			break;

		case "operator":
			redirectURL = "ApplicationFrameSet.asp"
			break;

		case "dispatch":
			redirectURL = "DispatchFrameSet.asp"
			break;

		case "admin":
			redirectURL = "AdminFrameSet.asp"
			break;
	}

	var mainLocation = h.IsDefined(User.CurrentUser())
		? redirectURL
		: "LoginScreen.asp?redirect=" + redirectURL
    
    

/*--- /END ASP -----------------------------------------------------------------------------------------*/%>

<html>
<% Response.AddHeader("X-UA-Compatible", "IE=edge"); %>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>HomeSmart AfterHours</title>
    <link href="UniversalStyleSheet.css" rel="stylesheet" type="text/css" />
    <link href="Content/Styles/HomeSmartAfterHours.css" rel="stylesheet" type="text/css" />
	<link href="Content/Styles/Modules/ScriptDisplayModule.css" rel="stylesheet" type="text/css" />
	<link href="Content/Styles/jqueryUI/jquery-ui.css" rel="stylesheet" type="text/css" />
	<link href="Content/Styles/jQueryUIOverrides.css" rel="stylesheet" type="text/css" />
</head>


<body>

    <div style="" class="SearchFormText" id="header">
        
		<span id="btnNavContainer">
            <a href="SearchFrameSet.asp" target="main">
	            <img src="Content/Images/NavButtonSearch.png" alt="Search" name="BtnSearch" width="100" height="23" border="0" id="BtnSearch" />
            </a><!--
            --><a href="ApplicationFrameSet.asp" target="main">
	            <img src="Content/Images/NavButtonOperator.png" alt="Operator" name="BtnOperator" width="100" height="23" border="0" id="BtnOperator" />
            </a><!--
            --><a>
	            <img src="Content/Images/NavButtonHelp.png" alt="Help" id="BtnHelp" width="100" height="23" border="0" id="BtnHelp" />
            </a>
            
            <br>
            
	        <a href="DispatchFrameSet.asp" target="main">
		        <img src="Content/Images/NavButtonDispatch.png" alt="Dispatch" name="BtnDispatch" width="100" height="23" border="0" id="BtnDispatch" />
	        </a><!--
	        --><a href="AdminFrameset.asp" target="main">
		        <img src="Content/Images/NavButtonAdmin.png" alt="Admin" name="BtnAdmin" width="100" height="23" border="0" id="BtnAdmin" />
	        </a><!--
	        --><a href="javascript: void(0);" >
		        <img src="Content/Images/NavButtonScripts.png" alt="Scripts" name="BtnScripts" width="100" height="23" border="0" id="BtnScripts" />
	        </a><!--
	        --><a href="LoginScreen.asp" target="main">
		        <img src="Content/Images/NavButtonLogOut.png" alt="Log Out" name="BtnLogOut" width="100" height="23" border="0" id="BtnLogOut" />
	        </a>
      
        </span>
        
	    <span id="MsgToUsers">
        </span>

		<div id="currentUser">
			Current User:
			<p><%= User.CurrentUser() %></p>
		</div>

    </div>



    <iframe id="CheckMessage" name="CheckMessage" src="">"src is set in HomeSmartAfterHours.Init()"</iframe>
    <iframe id="main" name="main" src="<%= mainLocation %>" border="0px" ></iframe>	



	<!-- SCRIPTS DIALOG MODULE -->

<div id="scriptDialogChrome"> <!-- this chrome div is because jqueryUI resizable and draggable dont work so well when resizing/dragging on top of an iframe (the #main iframe in this case) so this chrome div provides a padding between the draggable/resizable element and the iframe so that the iframe doesnt try to hijack the mouseover/mouseout -->
	<div id="scriptDialogViewPort">
		<ul id="scriptDialogScrollContainer">
			<li class="panel" id="scriptPanel-TOC" loaderFunction="LoadIndex">
				<h3 class="header">

					<span class="title">
						Index
					</span>

					<span class="panelNavButton rightNav" scrollTo='#scriptPanel-Script'>
						<span class="buttonEnd ArrowLeft"></span>
						<span class="buttonCenter">Script</span>
						<span class="buttonEnd ArrowRight"></span>
					</span>
					<span class="panelNavButton rightNav" scrollTo='#scriptPanel-Search'>
						<span class="buttonEnd ArrowLeft"></span>
						<span class="buttonCenter">Search</span>
						<span class="buttonEnd ArrowRight"></span>
					</span>
				</h3>
				<div class="content"></div>
				<div class="footer">
				</div>
			</li>

			<!-- SEARCH PANEL -->
			<li class="panel" id="scriptPanel-Search">
				<h3 class="header">
					<span class="panelNavButton leftNav" scrollTo='#scriptPanel-TOC' loaderFunction="">
						<span class="buttonEnd ArrowLeft"></span>
						<span class="buttonCenter">Index</span>
						<span class="buttonEnd ArrowRight"></span>
					</span>

					<span class="title">
						Search
					</span>

					<span class="panelNavButton rightNav" scrollTo='#scriptPanel-Script' loaderFunction="" >
						<span class="buttonEnd ArrowLeft"></span>
						<span class="buttonCenter">Script</span>
						<span class="buttonEnd ArrowRight"></span>
					</span>

				</h3>

				<div class="content">
					<div class="scriptSearchBoxContainer">
						<span class="scriptSearchBoxLeft"></span><!-- these comments are to prevent whitespace from appearing inbetween these elements because they are inline. the comments make the browser think that its all one run-on line of html
						--><input type="text" class="scriptSearchBoxMiddle" id="scriptSearchBoxInput" /><!--
						--><span class="scriptSearchBoxRight"></span>
						<img id="scriptSearchBoxWait" src="Content/Images/SmallSpinner.gif" />
					</div>
				</div>

				<div class="footer">
				</div>
			</li>
        
			<!-- SCRIPT PANEL -->
			<li class="panel" id="scriptPanel-Script">
				<h3 class="header">
					<span class="panelNavButton leftNav" scrollTo='#scriptPanel-TOC'>
						<span class="buttonEnd ArrowLeft"></span>
						<span class="buttonCenter">Index</span>
						<span class="buttonEnd ArrowRight"></span>
					</span>					
					<span class="panelNavButton leftNav" scrollTo='#scriptPanel-Search'>
						<span class="buttonEnd ArrowLeft"></span>
						<span class="buttonCenter">Search</span>
						<span class="buttonEnd ArrowRight"></span>
					</span>

					<span class="title">
						Script
					</span>

				</h3>
				<div class="content">
					<div id="scriptPanel-Script-PleaseWait"></div>
					<iframe id="scriptPanel-Script-ScriptContainer"></iframe>
				</div>
				<div class="footer">
				</div>
			</li>
    
		</ul>
	</div>
</div>

	<!-- /SCRIPTS DIALOG MODULE/ -->



    <script type="text/javascript" src="Content/Scripts/jquery.js"></script>
	<script type="text/javascript" src="Content/Scripts/jquery-ui.js"></script>
	<script type="text/javascript" src="Content/Scripts/jquery.scrollTo-1.4.2.js"></script>
    <script type="text/javascript" src="Content/Scripts/HomeSmartAfterHours.js"></script>
	<script type="text/javascript" src="Content/Scripts/Modules/ScriptDisplayModule.js"></script>
 
</body>
</html>
